I've found it useful to display the panic message *before* dropping into the
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 15 Mar 2006 10:07:26 +0000 (11:07 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 15 Mar 2006 10:07:26 +0000 (11:07 +0100)
debugger. Once there it may be very difficult to find the original message,
and often a debugger isn't even needed if you can see what panicked.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/drivers/char/console.c

index 5fb9bc214b528bb71d93ec1aa867ba883ee11edf..16b07cb3daa227d865e3ff28fb15d24a23386d26 100644 (file)
@@ -683,8 +683,6 @@ void panic(const char *fmt, ...)
     (void)vsnprintf(buf, sizeof(buf), fmt, args);
     va_end(args);
 
-    debugger_trap_immediate();
-
     /* Spit out multiline message in one go. */
     spin_lock_irqsave(&lock, flags);
     printk("\n****************************************\n");
@@ -694,6 +692,8 @@ void panic(const char *fmt, ...)
     printk("Reboot in five seconds...\n");
     spin_unlock_irqrestore(&lock, flags);
 
+    debugger_trap_immediate();
+
     watchdog_disable();
     mdelay(5000);
     machine_restart(0);